home *** CD-ROM | disk | FTP | other *** search
- ************** 68020_swtch.s ****************
- -------------------------------------
- ************** Makefile ****************
- -------------------------------------
- ************** README ****************
- -------------------------------------
- ************** SLOCK.c ****************
- -------------------------------------
- ************** asmdefs.h ****************
- -------------------------------------
- ************** atack.c ****************
- -------------------------------------
- ************** atomic_int.h ****************
- -------------------------------------
- ************** c.h ****************
- -------------------------------------
- ************** callstate.C ****************
- -------------------------------------
- ************** callstate.h ****************
- -------------------------------------
- ************** config.h ****************
- -------------------------------------
- ************** debug.C ****************
- -------------------------------------
- ************** debug.h ****************
- -------------------------------------
- ************** defs.h ****************
- -------------------------------------
- ************** diffs ****************
- -------------------------------------
- ************** dynix_timer.C ****************
- 176a177
- > /*
- 185a187
- > */
- -------------------------------------
- ************** hc_slock_asm.h ****************
- -------------------------------------
- ************** i386_swtch.s ****************
- -------------------------------------
- ************** locks.C ****************
- -------------------------------------
- ************** locks.h ****************
- -------------------------------------
- ************** machdep.h ****************
- -------------------------------------
- ************** main.h ****************
- -------------------------------------
- ************** main_done.C ****************
- -------------------------------------
- ************** main_init.C ****************
- -------------------------------------
- ************** main_main.C ****************
- -------------------------------------
- ************** makelinks ****************
- -------------------------------------
- ************** makelog ****************
- -------------------------------------
- ************** mips_lock.s ****************
- -------------------------------------
- ************** mips_swtch.s ****************
- -------------------------------------
- ************** misc.C ****************
- -------------------------------------
- ************** ns32000_swtch.s ****************
- -------------------------------------
- ************** objects.C ****************
- -------------------------------------
- ************** objects.h ****************
- -------------------------------------
- ************** parallel.h ****************
- -------------------------------------
- ************** preempt.C ****************
- -------------------------------------
- ************** presto.C ****************
- -------------------------------------
- ************** presto.h ****************
- -------------------------------------
- ************** process.C ****************
- 118c118,119
- < tlist [i] = new Thread ("prealloc", 0, DEFSTACKSIZ);
- ---
- > tlist [i] = new Thread ("prealloc", 0,
- > DEFSTACKSIZ);
- 694c695
- < for (i=p_thread_freelist->length(); i > lcl_thread_freelist_thresh/2; i--)
- ---
- > for (i=p_thread_freelist->length(); i>lcl_thread_freelist_thresh/2; i--)
- 697,702c698,699
- <
- < if (t == 0)
- < {
- < break;
- < }
- < else if (thread_global_freelist.length() > gbl_thread_freelist_max)
- ---
- > if (t == 0) break;
- > if (thread_global_freelist.length() > gbl_thread_freelist_max)
- 704c701,704
- < delete t;
- ---
- > //#ifdef DEBUG_STARTUP
- > cout << "Global thread freelist too big, deleting thread\n";
- > //#endif DEBUG_STARTUP
- > delete (t);
- 707d706
- < {
- 709d707
- < }
- -------------------------------------
- ************** process.h ****************
- 4,5d3
- < //
- < //
- 200,201c198
- < t = (Thread *) new char [sizeof(Thread)];
- < cout << "new() THREAD at " << (void *) t << endl;
- ---
- > return (t = (Thread *) new char [sizeof(Thread)]);
- 220d216
- < cout << "got thread from freelist\n"; cout.flush();
- 226d221
- < cout << "had to alloc thread\n"; cout.flush();
- 239,240d233
- <
- < cout << form ("appended thread at 0x%x to freelist", t) << endl;
- 248d240
- < cout << "freeing up global threads" << endl;
- 250,255d241
- < }
- < else
- < {
- < cout << "freelist length: " << p_thread_freelist->length() << ' '
- < << "threshold: " << lcl_thread_freelist_thresh << ' '
- < << "So, free threads is doing nothing" << endl;
- -------------------------------------
- ************** pstream.C ****************
- -------------------------------------
- ************** pstream.h ****************
- -------------------------------------
- ************** scheduler.C ****************
- -------------------------------------
- ************** scheduler.h ****************
- -------------------------------------
- ************** scheduler_sig.C ****************
- -------------------------------------
- ************** shbrk.c ****************
- -------------------------------------
- ************** shmalloc.c ****************
- -------------------------------------
- ************** slock_asm.h ****************
- -------------------------------------
- ************** spinlock.C ****************
- -------------------------------------
- ************** spinlock.h ****************
- -------------------------------------
- ************** spinlock_impl.h ****************
- -------------------------------------
- ************** stack.C ****************
- -------------------------------------
- ************** stack.h ****************
- -------------------------------------
- ************** swtch.s ****************
- -------------------------------------
- ************** synchro.C ****************
- -------------------------------------
- ************** synchro.h ****************
- -------------------------------------
- ************** threadq.h ****************
- -------------------------------------
- ************** threads.C ****************
- 5a6,11
- > * Last modified: xx/8/91
- > * by: pbd
- > * reason: converted from using "assignment to this"
- > * over to overloaded new/delete functions for
- > * thread memory management.
- > *
- 46d51
- < extern "C" init_atack (void *, int *);
- 88,92c93
- <
- < cout << form("new Thread allocated at 0x%x", t) << endl;
- <
- < if (init_reqd) // initialization reqd if allocated
- < { // instead of being reused.
- ---
- > if (init_reqd) // initialization reqd if allocated
- 94,97d94
- < }
- < t->t_slockcount = 0;
- < t->t_callstate.init(); // intentional ctor
- < t->t_expired = 0;
- 101a99,104
- > void Thread::operator delete (void *t)
- > {
- > // no-op: threads are not managed by deletion,
- > // but C++ wants us to have a delete() if we have a new().
- > }
- >
- 104d106
- < cout << "creating thread \"" << name << "\"" << endl;
- 111,126c113,115
- < /* This material is bogus: there is no way to tell whether or
- < not this call is for a base or derived class object
- <
- < {
- < t_slockcount = 0;
- < t_callstate.init();
- < t_expired = 0;
- < t_stack_size = 0; // there is no stack yet
- < }
- < */
- <
- < #ifdef DEBUG_STARTUP
- < dout << form("thisthread creating thread %s (%x)\n",
- < name, this);
- < #endif /* DEBUG_STARTUP */
- <
- ---
- > t_slockcount = 0;
- > t_callstate.init();
- > t_expired = 0;
- 236,237d224
- < cout << form ("destructing thread at 0x%x", this) << endl;
- <
- 239d225
- < // this = 0;
- 256d241
- < cout << "freeing thread" << endl;
- 258d242
- < // this = 0;
- -------------------------------------
- ************** threads.h ****************
- 93,94d92
- < /* virtual Thread* newthread(char* name=0, int tid = 0, // vtl ctr
- < long ssiz = DEFSTACKSIZ); */
- 95a94
- > void operator delete(void *);
- -------------------------------------
- ************** timer.C ****************
- -------------------------------------
- ************** timer.h ****************
- -------------------------------------
- ************** unix_timer.C ****************
- -------------------------------------
- ************** vax_swtch.s ****************
- -------------------------------------
-